package com.xjl.everyinterview.utils.ftps;

import org.joda.time.DateTime;

/**
 *
 *
 * @author xiaojinlu1990@163.com
 * Date: 2021年8月31日19:40:53
 * Time:
 * Description: No Description
 */
public class DateUtils {

    public static String getMonthText(){
        DateTime dateTime = new DateTime();
        return dateTime.minusDays(1).toString("yyyy-MM");
    }

    public static String getBeforeMonthText(){
        DateTime dateTime = new DateTime();
        return dateTime.minusMonths(1).toString("yyyyMM");
    }

    public static String getDayText(){
        DateTime dateTime = new DateTime();
        return dateTime.minusDays(1).toString("yyyyMMdd");
    }

    public static void main(String[] args) {
        System.out.println(getMonthText());
        System.out.println(getDayText());
        System.out.println(getBeforeMonthText());
    }
}
